<?php
 define('IN_DAEM', true); include_once '../includes/init.php'; $gid = $_POST['gid']; $gname = $_POST['gname']; $purview = $_POST['purview']; $insert = ''; if ($purview != '') { foreach ($purview as $val) { $insert .= "('".$gid."','".$val."'),"; $purview_zi = $_POST['purview'.$val]; foreach ($purview_zi as $value) { $insert .= "('".$gid."','".$value."'),"; } } $insert = trim($insert,','); } $sql = "delete from ".DB_DAEMDB.".".TB_SUFFIX."db_purview where p_gid='".$gid."'"; $db->query($sql); writerecord($_SESSION['UserId'],'修改群组权限！',$gname); if ($insert != '') { $sql = "insert into ".DB_DAEMDB.".".TB_SUFFIX."db_purview(p_gid,p_rid) values".$insert.""; $db->query($sql); $db->close(); gourl('权限修改成功。','',-1); } gourl('权限修改成功。','',-1); 